import subprocess as sp
import cv2
import requests
import time

#cap = cv2.VideoCapture("rtsp://admin:nncsys2019@192.168.100.92")
cap = cv2.VideoCapture("rtsp://admin:HikJMWWLW@192.168.1.64")

ret,f = cap.read()
while (cap.isOpened()):
    ret, frame = cap.read()
    if not ret:
        print("Opening camera is failed")
        break
    cv2.imshow('f',frame)
    if cv2.waitKey(27) & 0xFF == ord('q'):
        break

cap.release()
cv2.destroyAllWindows()

